﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    abstract class NPC
    {


        private string type;
        private string name;
        private string taskInfo;
        public string Name {
            get { return this.name; }
            set { this.name = value; }
        }

        public string Type
        {
            get { return this.type; }
            set { this.type = value; }
        }
        public string TaskInfo
        {
            get { return this.taskInfo; }
            set { this.taskInfo = value; }
        }
        public abstract void Speak();
        public void Info()
        {
            Console.WriteLine("名字：{0}，NPC类型：{1}，简介：{2}", this.Name, this.Type, this.taskInfo);
        }
        public NPC() { }
        public NPC(string name,string taskInfo) {
            this.name = name;
            this.taskInfo = taskInfo;
        }
    }

    class TaskNPC : NPC
    {
        public override void Speak()
        {
            Type = "任务NPC"; 
            base.Info();
        }
        public TaskNPC(string name, string taskInfo)
        {
            this.Name = name;
            this.TaskInfo = taskInfo;
        }
    }
    class Gather : TaskNPC
    {
        public Gather(string name, string taskInfo) : base(name, taskInfo) { }
        public void gather()
        {
            Speak();
            Console.WriteLine("为什么最近嫦娥给的萝卜有股味道？？");
            Console.WriteLine("你能帮我弄点没味道的萝卜吗，我会报答你的！！！");
        }
    }
    class Deliver : TaskNPC
    {
        public Deliver(string name, string taskInfo) : base(name, taskInfo) { }
        public void deliver()
        {
            Speak();
            Console.WriteLine("我有工作走不开，不知道嫦娥怎么样了");
            Console.WriteLine("你能帮我给嫦娥送个信吗！！！");
        }
    }
    class Monster : TaskNPC
    {
        public Monster(string name, string taskInfo) : base(name, taskInfo) { }
        public void monster()
        {
            Speak();
            Console.WriteLine("我讨厌兔子，那只兔子竟敢给我有怪味的萝卜");
            Console.WriteLine("你去帮我杀点兔子，我不会亏待你的！！！");
        }
    }
}
